package cc.mycraft.events;

import java.util.Date;
import java.util.UUID;

import org.bukkit.entity.Player;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;

import cc.mycraft.AccountCheck;


public final class MyCraftAccountCheckEvent extends Event {
	
	private static final HandlerList handlers = new HandlerList();

	@Override
	public HandlerList getHandlers() {
		return handlers;
	}
	
	public static HandlerList getHandlerList() {
		return handlers;
	}
	
	private long Time;
	
	private String PlayerName;
	private UUID uuid;
	private byte checkType;
	private byte result;
	private String resultobj;
	private Player player;
	
	public MyCraftAccountCheckEvent(String PlayerName,UUID uuid,Player p,byte checkType) {
		this.Time = new Date().getTime();
		this.player = p;
		this.PlayerName = PlayerName;
		this.uuid = uuid;
		this.checkType = checkType;
	}
	public MyCraftAccountCheckEvent(String PlayerName) {
		this.Time = new Date().getTime();
		this.checkType = AccountCheck.TC_UUID_FNAME;
		this.PlayerName = PlayerName;
	}
	public MyCraftAccountCheckEvent(UUID uuid) {
		this.Time = new Date().getTime();
		this.checkType = AccountCheck.TC_NAME_FUUID;
		this.uuid = uuid;
	}
	
	public void setPlayer(Player p) {
		this.player = p;
	}
	public void setResult(byte result,String obj) {
		this.result = result;
		this.resultobj = obj;
	}
	public byte getResult() {
		return this.result;
	}
	public String getResultObj() {
		return this.resultobj;
	}
	public Player getPlayer() {
		return this.player;
	}
	public byte getCheckType() {
		return this.checkType;
	}
	public UUID getCheckUUID() {
		return this.uuid;
	}
	public String getCheckName() {
		return this.PlayerName;
	}
	
	
	public long getTime() {
		return this.Time;
	}
	
	
}
